//
// Bomberman.cpp for bmoberman in /home/noboa_y//noboa-y-global/yn
//
// Made by youri noboa
// Login   <noboa_y@epitech.net>
//
// Started on  Tue Apr 24 17:13:10 2012 youri noboa
// Last update Thu Apr 26 15:24:45 2012 youri noboa
//

#include	"Bomberman.hh"

namespace Model
{
  void Bomberman::initialize(void)
  {
    gdl::Color	rgb(255, 0, 0);

    this->model_ = gdl::Model::load("../libgdl_gl-2012.1/assets/marvin.fbx");
    this->model_.set_default_model_color(rgb);
  }

  void Bomberman::update(const gdl::GameClock &gameClock, gdl::Input &input)
  {
    this->model_.update(gameClock);
    if (input.isKeyDown(gdl::Keys::P) == true)
      this->model_.play("Take 001");
  }

  void Bomberman::draw(void)
  {
    glPushMatrix();
    glLoadIdentity();
    glTranslatef(0.0f, 0.0f, -900.0f);
    this->model_.draw();
  }
}
